home *** CD-ROM | disk | FTP | other *** search
- using System;
- using System.Web.UI;
-
- namespace gbweb
- {
- public partial class RSS : Page
- {
- protected string url;
-
- protected void Page_PreRender(object sender, EventArgs e)
- {
- GBPVR.RSS.RSS rss = new GBPVR.RSS.RSS();
- string filter = Request.Params["filter"];
-
- url = Request.Url.ToString().Replace(
- Request.Url.Scheme + Uri.SchemeDelimiter + Request.Url.Authority,
- Request.Url.Scheme + Uri.SchemeDelimiter + Request.Headers["Host"]);
- try
- {
- url = url.Substring(0, url.IndexOf("/gbpvr/"));
- }
- catch
- {
- url = url.Substring(0, url.IndexOf("/gbweb/"));
- }
-
- if (filter != null)
- {
- Response.Clear();
- rssFeedInfo.Visible = false;
- Response.AppendHeader("Content-Type", "text/xml");
- if ((Request.Params["encl_dir"] != null) && (Request.Params["encl_port"] != null))
- {
- Response.Write(rss.genRss(false, filter, null, false, url, false, Request.Params["encl_dir"], Request.Params["encl_port"]));
- }
- else
- {
- Response.Write(rss.genRss(false, filter, null, false, url, false));
- }
-
- return;
- }
- else
- {
- in_progressLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=in-progress");
- completedLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=completed");
- pendingLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=pending");
- conflictLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=conflict");
- failedLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=failed");
- seasonLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=season");
- deletedLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=deleted");
-
- in_progressLinkB.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=in-progress");
- completedLinkB.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=completed");
- pendingLinkB.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=pending");
- conflictLinkB.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=conflict");
- failedLinkB.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=failed");
- seasonLinkB.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=season");
- deletedLinkB.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=deleted");
- }
- }
-
- }
- }
-